package com.eastfair.pay.dao;

import com.eastfair.boot.mapper.SuperMapper;
import com.eastfair.pay.entity.CollectRecord;
import com.eastfair.pay.vo.CollectRecordVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * Mapper 接口
 * 认款记录
 * </p>
 *
 * @author clm
 * @date 2022-06-08
 */
@Repository
public interface CollectRecordMapper extends SuperMapper<CollectRecord> {

    List<CollectRecordVO> queryCollectByPlanId(@Param("paymentPlanId") Long paymentPlanId);

    List<CollectRecordVO> queryCollectByRecordId(@Param("recordId")Long recordId);

    BigDecimal getUnCollectForType(@Param("collectType")String collectType, @Param("businessId")Long businessId);

    BigDecimal getTotalReturnAmount(@Param("businessId")Long businessId);

    List<CollectRecordVO> getRecordListByOrderNum(@Param("orderNum") String orderNum);
}
